import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/home/Home.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'Home',
    component: Home
  },
  {
    path: '/about',
    name: 'About',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () => import(/* webpackChunkName: "about" */ '../views/about/About.vue')
  },
  {
    path: '/contact',
    name: 'Contact',
    component: () => import('../views/contact/Contact.vue')
  },
  {
    path: '/join',
    name: 'Join',
    component: () => import('../views/join/Join.vue')
  },
  {
    path: '/brand',
    name: 'Brand',
    component: () => import('../views/brand/Brand.vue')
  },
  {
    path: '/brand/detail/:id',
    name: 'BrandDetail',
    component: () => import('../views/brand/Detail.vue')
  },
  {
    path: '/news',
    name: 'News',
    component: () => import('../views/news/News.vue')
  },
  {
    path: '/news/detail/:id',
    name: 'NewsDetail',
    component: () => import('../views/news/Detail.vue')
  },
  {
    path: '/manual/:id',
    name: 'manual',
    component: () => import('../views/manual/Manual')
  },
  {
    path: '/product/:id',
    name: 'product',
    component: () => import('../views/product/Product')
  },
  {
    path: '/tips/:id',
    name: 'tips',
    component: () => import('../views/tips/Tips')
  }
]

const router = new VueRouter({
  routes
})

export default router
